<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="jquery.js"></script>
<style type="text/css">
 

</style>
</head>
<body>
 <div id="div1"  style="width:500px;height:200px;overflow-x:hidden;overflow-y:hidden;"> 
 		<div>
 		
 		</div>
 </div>
  <div id="div2" style="width:500px;height:200px;background:green;overflow-y:hidden;overflow-x:auto;">
 		<div style="width:700px;height:100px;">aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1</div>
 </div> 
 <div id="div3">sdfsdfsdfsdf</div>
 
 <input type="button" value="调用DIV" id="bt1"> 
 
 <div style="float:left;height: 32px;background: red;">
 	<span>  
 	</span>
 </div>
 <script type="text/javascript">
 

 	$("#div2").scroll(function(){
 		//console.log($(this).scrollLeft());
 		$("#div1").scrollLeft($(this).scrollLeft())
 	});
 	var div = $("<div id='div4'> aaaaaaaaaaaaa<div>");
 	div.data("row",{a:"1"});
 	$("#div3").append(div);
 	
 	$("#bt1").click(function(){
 		
 		var row =$("#div4").data("row");
 		console.log(row);
 		
 	});
 	
    var b = function(){
    	
    	console.log(1);
    }
 	
 	console.log(typeof(b));
 </script>
</body>
</html>